package com.atguigu.gulimall.product.feign.fallback;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.WareFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @create: 2024/8/29
 * @author: gyhe10
 * @description: WareFeignService 接口的降级实现类
 **/

@Slf4j
@Component
public class WareFeignServiceFallback implements WareFeignService {
    @Override
    public R getSkusHasStock(List<Long> skuIds) {
        log.info("远程调用 ware 微服务，批量查询商品库存情况失败，所查商品ID：{}", skuIds);
        return R.error("远程调用 ware 微服务，批量查询商品库存情况失败");
    }
}
